using System;
using System.Threading;
using HelloWindowsPhoneMVC.ViewModels.Debug;
using WindowsPhoneMVC;
using WindowsPhoneMVC.ActionResults;

namespace HelloWindowsPhoneMVC.Controllers
{
    public class DebugController : Controller
    {
        public ActionResult PageWithResult()
        {
            return Page(new PageWithResultViewModel());
        }

        public PartialViewResult DemoPartial()
        {
            Thread.Sleep(2000);

            return Partial(new PartialViewModel(new[]{"one", "two", "three","data from controller action"}));
        }

        public ActionResult BackgroundAction()
        {
            Thread.Sleep(2000);

            return Nothing();
        }
    }
}